﻿using OT.Data;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace OT.Areas.Admin.Models
{
    public class Questions
    {
        public int QuestionID { get; set; }
        [DataType(DataType.MultilineText)]
        [Required, DisplayName("Question Name")]
        public string QuestionName { get; set; }

        [Required, DisplayName("Question Type")]
        public int? QuestionTypeID { get; set; }

        [Required, DisplayName("Subject")]
        public int? SubjectID { get; set; }

        [Required, DisplayName("User")]
        public int UserID { get; set; }

        [Required, DisplayName("Topic")]
        public int? TopicID { get; set; }


        [Required, DisplayName("Answer1"), DataType(DataType.MultilineText)]
        public string Answer1 { get; set; }

        [Required, DisplayName("Answer2"), DataType(DataType.MultilineText)]
        public string Answer2 { get; set; }
        [DataType(DataType.MultilineText)]
        [DisplayName("Answer3")]
        public string Answer3 { get; set; }
        [DataType(DataType.MultilineText)]
        [DisplayName("Answer4")]
        public string Answer4 { get; set; }
        [Required, DisplayName("Display Answer")]
        public byte DisplayAnswer { get; set; }

        [Required, DisplayName("Correct Answer")]
        public byte CorrectAnswer { get; set; }
        [DisplayName("Use Latex")]
        public bool UseLatex { get; set; }
        [Required, DisplayName("Status")]
        public bool Status { get; set; }


        public System.DateTime CreatedDate { get; set; }
        public System.DateTime UpdatedDate { get; set; }

        [DisplayName("Question Type")]
        public string QuestionType1 { get; set; }

        [DisplayName("Subject")]
        public string SubjectName { get; set; }
       
        public string CategoryName { get; set; }
        public int? CategoryID { get; set; }

        [DisplayName("User")]
        public string FirstName { get; set; }

        [DisplayName("Topic Name")]
        public string TopicName { get; set; }


        public int TestID { get; set; }
        public int TestQuestionID { get; set; }
        public int Duration { get; set; }
        public string YourAns{get;set;}
        public int TotalQuestion { get;set; }
        public int CurrentQuestion { get; set; }

        public ICollection<QuestionType> QuestionTypes { get; set; }
        public ICollection<Topic> Topics { get; set; }
        public ICollection<Subject> Subjects { get; set; }
        public ICollection<User> Users { get; set; }
        public ICollection<Category> catgo { get; set; }

        public int LanguageID { get; set; }

    }

    public class QuestionSelection
    {
        public int? QuestionID { get; set; }
        [DataType(DataType.MultilineText)]
        [Required, DisplayName("Question Name")]
        public string QuestionName { get; set; }
        public int TestID { get; set; }
        public string IsQuestionSelected { get; set; }
    }
}